<%@page import="java.util.ArrayList"%>
<%@page import="实体类.Student"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

	<c:set var="name" value="张三" scope="request"></c:set>
	${name }
	<hr>
	
	<c:set var="score" value="70"></c:set>
	<c:choose>
		<c:when test="${score>=90 }">
			优秀
		</c:when>
		<c:when test="${score<=90 && score>80 }">
			良好
		</c:when>
		<c:when test="${score<=80 && score>80}">
			一般
		</c:when>
		<c:when test="${score<=70 && score>60}">
			及格
		</c:when>
		<c:otherwise>
			不及格
		</c:otherwise>
	</c:choose>
	<hr>
	
	<%
		Student student1 = new Student(1,"张三1",27,"男");
		Student student2 = new Student(2,"张三2",27,"男");
		Student student3 = new Student(3,"张三3",27,"男");
		ArrayList<Student> list = new ArrayList<Student>();
		list.add(student1);
		list.add(student2);
		list.add(student3); 
		request.setAttribute("list", list);
	%>
	<c:forEach items="${list }" var="student">
		${student }--${student.name }<br>
	</c:forEach>
	<hr>
	
	<%
		ArrayList<String> list2 = new ArrayList<String>();
		list2.add("中国");
		list2.add("美国");
		list2.add("英国");
		request.setAttribute("list2", list2);
	%>
</body>
</html>